
package com.auto.common;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.auto.base.pojo.SysRole;
import com.auto.base.pojo.SysUser;
import com.base.util.JUtil;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
//import com.auto.base.pojo.SysRole;



public class SessionInfo {
	
	private SysUser sysUser;
	private SysRole sysRole;
	private Set<String> allowUrl = new HashSet <String>();
	//key 存url value  存数据访问权限
	private List<Integer> allowAccessToDataUserIds = new ArrayList<Integer>();
	private JSONArray moduleList;
	private JSONObject loginUser;
	private String allowIds;
	//private String homeView="/jsp";//个人首页
	
	
	public String getAllowIds() {
		if(JUtil.isNull(allowIds)){
			setAllowIds(JUtil.splitListIntToString(allowAccessToDataUserIds));
		}
		return allowIds;
	}
	public void setAllowIds(String allowIds) {
		this.allowIds = allowIds;
	}
	public JSONArray getModuleList() {
		return moduleList;
	}
	public void setModuleList(JSONArray moduleList) {
		this.moduleList = moduleList;
	}
	public Set<String> getAllowUrl() {
		return allowUrl;
	}
	public void setAllowUrl(Set<String> allowUrl) {
		this.allowUrl = allowUrl;
	}
	public static void main(String[] args) {
		Set<String> set = new HashSet<String>();
		
	}
	public SysUser getSysUser() {
		return sysUser;
	}
	public void setSysUser(SysUser sysUser) {
		this.sysUser = sysUser;
	}
	public SysRole getSysRole() {
		return sysRole;
	}
	public void setSysRole(SysRole sysRole) {
		this.sysRole = sysRole;
	}
	public List<Integer> getAllowAccessToDataUserIds() {
		return allowAccessToDataUserIds;
	}
	
	public void setAllowAccessToDataUserIds(List<Integer> allowAccessToDataUserIds) {
		this.allowAccessToDataUserIds = allowAccessToDataUserIds;
	}
	public JSONObject getLoginUser() {
		return loginUser;
	}
	public void setLoginUser(JSONObject loginUser) {
		this.loginUser = loginUser;
	}
	
}
